package com.wh.wisdomsite.xbox.common;
import com.wh.wisdomsite.xbox.utils.properties.PropertiesToolMgr;

import java.util.HashMap;
import java.util.Map;


/***
 * 系统常量定义
 * @Package com.wh.wisdomsite.xbox.common
 * @author 谢泽鹏
 * @date 2016年11月07日 下午15:10
 * @Copyright 个人版权所有
 * @Company 贵州万华科技有限公司Copyright (c) 2016
 * @version V1.0
 */
public class Constants {

    /**
     * 系统全局配置(通用变量和属性)
     */
    public static final String UTF8 = "UTF-8";
    public static final String APPLICATION_XML = "application/xml";
    public static final String APPLICATION_JSON = "application/json";
    public static final String APPLICATION_NAME = "XBOX";
    public static final String APPLICATION_CALLTYPE_ANDROID = "ANDROID";
    public static final String APPLICATION_CALLTYPE_IOS = "IOS";

    //国际化失败
    public static final String BASE_NAMES = "i18n/xbox/error";
    //通过前端的负载均衡服务器时，请求对象中的IP会变成负载均衡服务器的IP，因此需要特殊处理，下同。
    public static final String X_REAL_IP = "X-Real-IP";
    //代表客户端，也就是HTTP的请求端真实的IP
    public static final String X_FORWARDED_FOR = "X-Forwarded-For";
    //代理IP, 头文件(各容器封装Header不同，导致取IP不同)
    public static final String PROXY_CLIENT_IP = "Proxy-Client-IP";
    public static final String WL_PROXY_CLIENT_IP = "WL-Proxy-Client-IP";
    public static final String HTTP_CLIENT_IP = "HTTP_CLIENT_IP";
    public static final String HTTP_X_FORWARDED_IP = "HTTP_X_FORWARDED_FOR";


    /******************************************************************************************/
    /***********************************[服务器URL]常量配置--开始*********************************/
    /******************************************************************************************/
    //XBOX服务地址
    public static String WEATHER_URL;
    //#贵安项目下，已安装设备所有监测点(扬尘接口)
    public static String ENVIRDEVICES_URL;
    //#贵安项目下，所有摄像头设备列表
    public static String CAMERADEVICE_URL;

    static{
        //初始化服务器地址
        PropertiesToolMgr.setFileName("server.properties");
        WEATHER_URL = PropertiesToolMgr.getPropertiesByKey("WEATHER.URL");
        ENVIRDEVICES_URL = PropertiesToolMgr.getPropertiesByKey("ENVIRDEVICES.URL");
    }
    /******************************************************************************************/
    /***********************************[服务器URL]常量配置--结束*********************************/
    /******************************************************************************************/


    /**
     * 系统会话Key
     * 生成sessionKey规则
     * 添加sessionKey[Key = (ReadisKey + sessionId), value = (sessionUser)]
     */
    public static final String ReadisKey = "socket:xbox:reuestId:";

    /**
     * 系统会话Value
     * 生成sessionValue规则
     * 添加sessionValue[key = (ReadisValue + userId/sessionId), value = (sessionId)]
     */
    public static final String ReadisValue = "socket:xbox:userId:";

    /**
     * 其他会话Key
     * 生成otherKey规则
     * 添加otherKey[Key = (OtherKey + sessionId), value = (当前缓存值)]
     */
    public static final String ReadisOtherKey = "socket:xbox:otherId:";


    /**
     * 其他值Key
     * 生成valueKey规则
     * 添加otherKey[Key = (key + 业务类型 + 流水号), value = (sessionId)]
     */
    public static final String ReadisVauleKey = "socket:xbox:key:";


    /**
     * 缓存的sessionUser
     */
    public static final String SESSION_USER = "sessionUser";

    /**
     * 缓存的配置端sessionUser
     */
    public static final String CONFIG_SESSION_USER = "configSessionUser";


    /**
     * 绑定项目
     */
    public static final String CONFIG_BIND_PROJECT = "bindProject";





    /**
     * 服务端存储信息
     */
    //服务端验证码码
    public static final String SERVER_ADMIN_VALICODE = "SERVER_ADMIN_VALICODE";
    //服务端系统用户
    public static final String SERVER_ADMIN_APPSECRET = "SERVER_ADMIN_APPSECRET";
    //服务端系统登录用户
    public static final String SERVER_SESSION_USER = "SERVER_SESSION_USER";


    /**
     * 当前城市信息
     */
    public static final String LOCATIONCITY= "locationCity";
    public static final String LOCATIONCITY_SESSONID= "locationCity_sessionId";




    /**
     * 公司信息(企业通用属性配置)
     */
    /******************************************************************************************/
    /***********************************[zsd配置]常量配置--开始***********************************/
    /******************************************************************************************/
    //[zsd配置]官网
    public static String ZSD_COMPANY_SITEWEB;
    //[zsd配置]官网地址
    public static String ZSD_COMPANY_SITEWEB_URL;
    //[zsd配置]公司名称
    public static String ZSD_COMPANY_NAME;
    //[zsd配置]用户名前缀
    public static String ZSD_COMPANY_USERNAME_FIX;
    //[zsd配置]400服务热线
    public static String ZSD_COMPANY_PHONE;
    //[zsd配置]400服务热线(时间)
    public static String ZSD_COMPANY_PHONE_SERVICETIME;
    //[zsd配置]公司热线
    public static String ZSD_COMPANY_HOTLINE;
    //[zsd配置]订阅号
    public static String ZSD_COMPANY_TAKENUMBER;
    //[zsd配置]计算器
    public static String ZSD_COMPANY_CALCULATE_URL;
    //[zsd配置]在线客服
    public static String ZSD_COMPANY_ONLINECUSTOMER;
    //[zsd配置]企业邮箱
    public static String ZSD_COMPANY_SERVICE_EMAIL;
    //[zsd配置]企业邮箱发送主机
    public static String ZSD_COMPANY_SERVICE_EMAIL_HOST;
    //[zsd配置]邮箱发送端口
    public static String ZSD_COMPANY_SERVICE_EMAIL_PORT;
    //[zsd配置]邮箱发送者
    public static String ZSD_COMPANY_SERVICE_EMAIL_SENDER;
    //[zsd配置]邮箱发送密码
    public static String ZSD_COMPANY_SERVICE_EMAIL_PASSWORD;
    //[zsd配置]邮箱发送昵称
    public static String ZSD_COMPANY_SERVICE_EMAIL_ALIAS;
    //[zsd配置]服务[通讯]传输密码
    public static String ZSD_COMPANY_SERVER_MESSAGE_PASSWORD;
    //[zsd配置]服务IP地址
    public static String ZSD_COMPANY_SERVER_IP;
    //[zsd配置]服务IP地址AK
    public static String ZSD_COMPANY_SERVER_AK;


    //[zsd配置]分享标题
    public static String ZSD_SHARE_TITLE;
    //[zsd配置]分享标题--惠享收视
    public static String ZSD_SHARE_TITLE_ACT_TV;
    //[zsd配置]分享摘要
    public static String ZSD_SHARE_SUBTITLE;
    //[zsd配置]分享摘要--惠享收视
    public static String ZSD_SHARE_SUBTITLE_ACT_TV;
    //[zsd配置]分享icon url
    public static String ZSD_SHARE_ICONURL;
    //[zsd配置]分享icon url--惠享收视
    public static String ZSD_SHARE_ICONURL_ACT_TV;
    //[zsd配置]分享详情url
    public static String ZSD_SHARE_DETAILURL;
    //[zsd配置]分享详情url--惠享收视
    public static String ZSD_SHARE_DETAILURL_ACT_TV;

    /******************************************************************************************/
    /***********************************[zsd配置]常量配置--结束***********************************/
    /******************************************************************************************/

    /**
     * 系统通用业务失败码
     */
    public static final String CODE_SUCCESS = "PC_200";
    public static final String CODE_SUCCESS_MSG = "成功";
    public static final String CODE_FAIL = "PC_002";
    public static final String CODE_FAIL_MSG = "失败";


    /**
     * 远程请求(服务器失败配置)
     */
    //服务响应编码
    public static final String RESCODE = "resCode";
    //服务响应消息
    public static final String RESMSG = "resMsg";
    //服务响应结果
    public static final String RESULT = "result";
    //返回网络异常标识
    public static String RETURN_NETWORK_EXCEIPTION = "服务器网络异常";
    //返回服务器异常标识
    public static String RETURN_SERVER_EXCEIPTION = "服务器解析异常";


    /**
     * 海康请求(服务器失败配置)
     */
    //服务响应编码
    public static final String ERRORCODE = "errorCode";
    //服务器响应消息
    public static final String ERRORMESSAGE = "errorMessage";
    //服务响应结果
    public static final String DATA = "data";



    /**
     * 配置端接口提示消息
     */
    //用户登录提示
    public static final String ZHGH_CONFIG_LOGIN_LOGIN_NAME_FAIL = "登录名/手机号重复错误！";
    public static final String ZHGH_CONFIG_LOGIN_USER_NOT_FIND = "该账号不存在！";

    //项目提示
    public static final String ZHGH_CONFIG_PROJECT_ID_NOT_FIND = "项目id不能为空！";
    public static final String ZHGH_CONFIG_PROJECT_NAME_NOT_FIND = "项目名称不能为空！";
    public static final String ZHGH_CONFIG_PROJECT_TYPE_NOT_FIND = "项目类型不能为空！";
    public static final String ZHGH_CONFIG_PROJECT_PURPOSE_NOT_FIND = "项目工程用途不能为空！";
    public static final String ZHGH_CONFIG_PROJECT_CONSTRUCT_NOT_FIND = "项目建设性质不能为空！";
    public static final String ZHGH_CONFIG_PROJECT_CREATE_SUCCESS = "项目创建成功！";
    public static final String ZHGH_CONFIG_PROJECT_CREATE_FAIL = "项目创建失败！";

    //公共字典提示
    public static final String ZHGH_CONFIG_COMONDICT_MODELCODE_NOT_FIND = "modelCode条件不能为空！";
    public static final String ZHGD_CONFIG_LOGIN_LOGIN_NAME_FAIL = "登录名/手机号重复错误！";
    public static final String ZHGD_CONFIG_LOGIN_USER_NOT_FIND = "该账号不存在！";

    //添加设备提示
    public static final String ZHGD_CONFIG_ADD_DEVICE_TYPE_NOT_EMPTY = "设备类型不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_TYPE_ERROR = "错误的设备类型！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_PROJECTID_NOT_EMPTY = "所属项目不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_NAME_NOT_EMPTY = "设备名称不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_NUM_NOT_EMPTY = "设备编号不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_LOCATE_NOT_EMPTY = "设备布点位置不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_VIDEOUSERID_NOT_EMPTY = "视频用户不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_CRANEUSETYPE_NOT_EMPTY = "起重机使用性质不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_CRANESTANDARDID_NOT_EMPTY = "起重机标准配置不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_VIUSERNAME_NOT_EMPTY = "视频用户名不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_VIPASSWORD_NOT_EMPTY = "视频用户密码不能为空！";
    public static final String ZHGD_CONFIG_ADD_DEVICE_VIDEOIP_NOT_EMPTY = "视频用户ip不能为空！";

    //请求绑定项目
    public static final String ZHGD_CONFIG_BINGPROJECT_CODE_NOT_EMPTY = "请求绑定编码不能位空！";
    public static final String ZHGD_CONFIG_BINGPROJECT_PROJECTID_NOT_EMPTY = "绑定项目编号不能为空！";
    public static final String ZHGD_CONFIG_BINGPROJECT_PROJECT_NOT_EXIST = "绑定项目编号不存在！";
    public static final String ZHGD_CONFIG_BINGPROJECT_SUCCESS = "请求绑定项目成功!";


    //获取绑定项目
    public static final String ZHGD_CONFIG_GET_BINGPROJECT_CODE_NOT_EMPTY = "验证绑定编码不能位空！";
    public static final String ZHGD_CONFIG_GET_BINGPROJECT_NOTBIND_EMPTY = "请先请求绑定项目！";
    public static final String ZHGD_CONFIG_GET_BINGPROJECT_NOTBIND_INVALID_EMPTY = "绑定失效请重新绑定！";
    public static final String ZHGD_CONFIG_GET_BINGPROJECT_SUCCESS = "获取绑定项目成功！";


    /**
     * 部署流程定义
     */
    public static final String ZHGD_WORKFLOW_DEPLOYMENT_FILENAME_NOT_EMPTY = "文件名称不能为空！";
    public static final String ZHGD_WORKFLOW_DEPLOYMENT_FILE_NOT_EMPTY = "请选择上传部署文件！";
    public static final String ZHGD_WORKFLOW_DEPLOYMENT_SUCCESS = "部署流程定义成功！";
    public static final String ZHGD_WORKFLOW_DEPLOYMENT_FAIL = "部署流程定义失败！";
    public static final String ZHGD_WORKFLOW_DEPLOYMENT_DEL_SUCCESS = "删除部署流程成功！";
    public static final String ZHGD_WORKFLOW_DEPLOYMENT_DEL_FAIL = "删除部署流程失败！";

    public static final String ZHGD_WORKFLOW_BUSINESS_DEL_SUCCESS = "采购申请删除成功！";
    public static final String ZHGD_WORKFLOW_BUSINESS_DEL_FAIL = "采购申请删除失败！";


    /**
     * 数据展示端提示消息
     */
    public static final String ZHGH_SHOW_PROJECT_ID_NOT_FIND = "没有查询到该项目";
    public static final String ZHGH_SHOW_PROJECT_ID_NOT_EMPTY = "项目ID不能为空";

    /**
     * 公共api提示消息
     */
    public static final String ZHGD_PUBAPI_PROJECT_DEVICEID_NOT_EMPTY = "设备ID不能为空";

    public static final Map<Integer, String>  COMLEVELNAMEMAP = new HashMap<>();

    /** ===========task 任务类型 ================ **/
    public static final int TASK_STATUS_0 = 0;
    public static final int TASK_STATUS_1 = 1;
    public static final String STR_SPACE = " ";


    static {



    }
}
